﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DARE
{
    public class CMenuBarData : CWidgetData
    {
        public CButtonData button;
        public CStaticTextData title;

        public override void FillDataStructure(CWidget wid)
        {
            CMenuBar w = wid as CMenuBar;
            base.FillDataStructure(wid);
            button = new CButtonData();
            button.FillDataStructure(w.CButton);
            title = new CStaticTextData();
            title.FillDataStructure(w.Title);
        }

        public override void FillFromDataStructure(ref CWidget wid, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref wid, hud);
            (wid as CMenuBar).Title.Text = title.text;
        }
    }
}
